/**
 * @Author: yqe@360shop.cn
 * @Date: 2020-06-03 18:17:52
 * @Last Modified by: zhangmeng
 * @Last Modified time: 2020-12-24 17:23:17
 */
import request from '@/utils/request'

// 获取街道
export function storeList(params) {
  return request({
    url: '/ShopApi/storeList',
    method: 'get',
    params
  })
}

// 获取附近门店
export function nearStoreList(params) {
  return request({
    url: '/ShopApi/nearStoreList',
    method: 'get',
    params
  })
}

/**
 * 关注数据
 * @param {*} data
 */
export function isSubscribeQrcode(params) {
  return request({
    url: '/PublicApi/isSubscribeQrcode',
    method: 'get',
    params
  })
}

/**
 * 店铺首页
 * @param {*} data
 */
export function reqPostShop(params) {
  return request({
    url: '/ShopApi/index',
    method: 'get',
    params
  })
}

/**
 * 店铺首页
 * @param {*} data
 */
export function getNewDiyHtml(params) {
  return request({
    url: '/ShopApi/newDiyHtml',
    method: 'get',
    params
  })
}
// 商品分组导航
export function getIndexGroupNav(params) {
  return request({
    url: '/ShopApi/getIndexGroupNav',
    method: 'get',
    params
  })
}

// 商品组件
export function singleDiyJson(params) {
  return request({
    url: '/ShopApi/singleDiyJson',
    method: 'get',
    params
  })
}

/**
 * 自定义模块
 * @param {*} data
 */
export function getNewDiyMoudle(params) {
  return request({
    url: '/ShopApi/newModuleHtml',
    method: 'get',
    params
  })
}

/**
 * 页面底部备案信息
 * @param {*} data
 */
export function reqPostShopBottom(params) {
  return request({
    url: '/ShopApi/getBottom',
    method: 'get',
    params
  })
}

/**
 * 专题详情
 * @param {Object}} params query parameters
 */
export function reqGetMagazine(params) {
  return request({
    url: '/ActivityMagazineApi/detail',
    method: 'get',
    params
  })
}

// 新分销专题接口
export function magazineDetailDiyHtml(params) {
  return request({
    url: '/ActivityMagazineApi/magazineDetailDiyHtml',
    method: 'get',
    params
  })
}
// 新分销专题留言部分接口
export function magazineMessageList(params) {
  return request({
    url: '/ActivityMagazineApi/message_list',
    method: 'get',
    params
  })
}

/**
 * 专题详情中的点赞
 * @param {*} data post params
 */
export function reqPostMagazinePraise(data) {
  return request({
    url: '/ActivityMagazineApi/ajaxPraise',
    method: 'post',
    data
  })
}
/**
 * 专题详情发表评论
 * @param {*} data post params
 */
export function reqPostMagazineReleaseMsg(data) {
  return request({
    url: '/ActivityMagazineApi/ajaxReleaseMessage',
    method: 'post',
    data
  })
}
/**
 * 专题详情评论点赞
 * @param {*} data post params
 */
export function reqPostMagazineMsgPraise(data) {
  return request({
    url: '/ActivityMagazineApi/ajaxMessagePraise',
    method: 'post',
    data
  })
}

// 专题分类列表
export function magazineList(params) {
  return request({
    url: '/ActivityMagazineApi/magazineList',
    method: 'get',
    params
  })
}
// 专题分类装修数据
export function magazineListDiyHtml(params) {
  return request({
    url: '/ActivityMagazineApi/magazineListDiyHtml',
    method: 'get',
    params
  })
}

// 专题分类组件
export function searchMagazineList(params) {
  return request({
    url: '/ActivityMagazineApi/searchMagazineList',
    method: 'get',
    params
  })
}

export function htmlCache(data) {
  return request({
    url: '/PublicApi/htmlCache',
    method: 'post',
    data
  })
}

export function getCityMain(params) {
  return request({
    url: '/ShopApi/getCityMain',
    method: 'get',
    params
  })
}

export function getModule(params) {
  return request({
    url: '/ShopApi/module',
    method: 'get',
    params
  })
}

// 获取城市主页数据
export function getCityModuleData(params) {
  return request({
    url: '/ShopApi/cityModule',
    method: 'get',
    params
  })
}

// 供应商店铺首页
export function getSupplier(params) {
  return request({
    url: '/ShopApi/supplier',
    method: 'get',
    params
  })
}
export function supplierDiyHtml(params) {
  return request({
    url: '/ShopApi/supplierDiyHtml',
    method: 'get',
    params
  })
}
export function getSupplierLists(params) {
  return request({
    url: '/ShopApi/supplierLists',
    method: 'get',
    params
  })
}

// 门店店铺
export function storeIndex(params) {
  return request({
    url: '/shopApi/store',
    method: 'get',
    params
  })
}

// 门店店铺太阳码
export function storeQrCode(params) {
  return request({
    url: '/shopApi/getMiniQrCode',
    method: 'get',
    params
  })
}

// 门店店铺自定义装修
export function storeDiyHtml(params) {
  return request({
    url: '/shopApi/storeDiyHtml',
    method: 'get',
    params
  })
}

/**
 * 根据经纬度获取位置信息
 * @param {*} data post params
 */
export function getLocationInformation(data) {
  return request({
    url: '/ShopApi/get_location_information',
    method: 'post',
    data
  })
}

/**
 * htmlCache、isSubscribeQrcode和ShopApi/index接口请求合并
 * @param {*} data
 */
export function indexConfig(params) {
  return request({
    url: '/PublicApi/indexConfig',
    method: 'get',
    params
  })
}

// 推广组件获取海报图
export function itemDetailQrcode(params) {
  return request({
    url: '/Public/itemDetailQrcode',
    method: 'get',
    params
  })
}
// 获取首页装修视频数据
export function GetIndexVideoDecoration(data) {
  return request({
    url: '/TencentVideo/analysis',
    method: 'post',
    data
  })
}
// 分享海报组件获取海报接口
export function posterShareUrl(data) {
  return request({
    url: '/PosterShare/get_url',
    method: 'post',
    data
  })
}
// 通用链接
export function universalLink(data) {
  return request({
    url: '/SupplierShop/universal_link',
    method: 'post',
    data
  })
}
// 开店礼包
export function OpenStoreGiftLists(params) {
  return request({
    url: '/OpenStoreGiftApi/lists',
    method: 'get',
    params
  })
}